/*
 * TypeDefinitions.h
 *
 *  Created on: Jan 8, 2014
 *      Author: angelo
 */

#ifndef TYPEDEFINITIONS_H_
#define TYPEDEFINITIONS_H_

#include "OLSRpkt_m.h"

enum STEM_ROLE
{
   STEM_STUB,
   STEM_TRANSIT,
   STEM_GATEWAY
};
typedef int STEM_ROLE_t;

typedef struct node_state_info {

    nsaddr_t address;
    unsigned int nhopDistance;
    unsigned int msg_id;
    float energy;
    float c_wifi;
    float c_cell;
    float distance;
    STEM_ROLE_t role;

    friend std::ostream& operator<<(std::ostream& os, const node_state_info& o)
    {
        os << "Addr: " << o.address
                << " nHop: " << o.nhopDistance
                << " msgID: " << o.msg_id
                << " E: " << o.energy
                << " Cw: " << o.c_wifi
                << " Cc: "  << o.c_cell
                << " Dist: " << o.distance
                << " Role: " << o.role;
        return os;
    }

} node_state_info_t;


typedef struct NodeInfo {

    node_state_info_t info;
    simtime_t timestamp;

    friend std::ostream& operator<<(std::ostream& os, const NodeInfo& o)
    {
        os << o.info;
        return os;
    }

} NodeInfo_t;


#endif /* TYPEDEFINITIONS_H_ */
